package com.whoimi.admin.service.impl;

import com.whoimi.admin.entity.DictItem;
import com.whoimi.admin.repository.DictItemRepository;
import com.whoimi.admin.service.DictItemService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @author whoimi
 * @since 2025-08-01
 **/
@Service
public class DictItemServiceImpl implements DictItemService {

    @Resource
    private DictItemRepository dictItemRepository;

    @Override
    public Iterable<DictItem> findAllByDictCodeAndStatusIsTrueOrderBySortAsc(String dictCode) {
        return dictItemRepository.findAllByDictCodeAndStatusIsTrueOrderBySortAsc(dictCode);
    }
}
